package cn.iocoder.yudao.module.todo.dal.mysql.tasksexecutors;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.todo.controller.admin.tasks.vo.TasksExecutorsPageReqVO;
import cn.iocoder.yudao.module.todo.dal.dataobject.tasksexecutors.TasksExecutorsDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 待办任务执行者 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface TasksExecutorsMapper extends BaseMapperX<TasksExecutorsDO> {

    default PageResult<TasksExecutorsDO> selectPage(TasksExecutorsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<TasksExecutorsDO>()
                .eqIfPresent(TasksExecutorsDO::getTaskId, reqVO.getTaskId())
                .eqIfPresent(TasksExecutorsDO::getUserId, reqVO.getUserId())
                .orderByDesc(TasksExecutorsDO::getTaskId));
    }

}